#include <iostream>
using namespace std;

int main()
{
	int time = 0;
	cin >> time;
	cout << time / 60 / 60 << " " << time / 60 % 60 << " " << time % 60 << endl;
	return 0;
}
